<template>
  <div class="app" >

      <!-- rourer-view 作为默认插槽内容 -->


          <keep-alive>
              <router-view v-if="$route.meta.keepAlive"></router-view>
          </keep-alive>
          <router-view v-if="!$route.meta.keepAlive"></router-view>





  </div>
</template>

<script>
    import { XHeader, Drawer, Group, Cell, ViewBox} from 'vux'
    export default {
      components: {
        XHeader,
        Drawer,
        Group,
        Cell,
        ViewBox
      },
      mounted () {
        const that = this
        this.bus.$on('menuShow', function (e) {
          console.log('打开菜单')
          that.drawerVisibility = true
        })
      },
      data () {
        return {
          msg: 'Hello World!',
          drawerVisibility:false

        }
      },
      meta: {
          pageTitle: '首页',
          keepAlive: true
      }
    }
</script>
<style lang="less">
  @import '~vux/src/styles/reset.less';
</style>
<style>
    html, body {
        width: 100%;
        overflow-x: hidden;
        overflow-y: scroll;
    }
</style>




